const { config } = require('./common')

const { apiPrefix } = config
let database = [
  {
    id: '2',
    name: '项目管理',
    icon: 'icon-project',
    route: '/project',
  },
  {
    id: '10',
    bpid: '2',
    name: '项目配置',
    icon: 'icon-config',
    route: '/project/:id/config',
  },
  {
    id: '3',
    bpid: '2',
    name: '消息管理',
    icon: 'icon-message',
    route: '/message',
  },
  {
    id: '4',
    bpid: '2',
    name: '组织管理',
    icon: 'icon-organization',
    route: '/organization',
  },
  {
    id: '5',
    bpid: '2',
    name: '分组管理',
    icon: 'icon-group',
    route: '/group',
  },
  {
    id: '6',
    bpid: '2',
    name: '用户管理',
    icon: 'icon-user',
    route: '/user',
  },
  {
    id: '7',
    bpid: '2',
    name: '角色管理',
    icon: 'icon-role',
    route: '/role',
  },
  {
    id: '8',
    bpid: '2',
    name: '节点管理',
    icon: 'icon-node',
    route: '/node',
  },
]

module.exports = {

  [`GET ${apiPrefix}/menus`] (req, res) {
    res.status(200).json(database)
  },
}
